#pragma once

#include <map>

namespace PlayFab<%- gemName %>Sdk
{
    enum PlayFabErrorCode
    {
        PlayFabErrorHostnameNotFound = 1,
        PlayFabErrorConnectionTimeout,
        PlayFabErrorConnectionRefused,
        PlayFabErrorSocketError,
        <% for(var i=0; i<errorList.length-1; i++) { var errorProps = errors[errorList[i]] %>PlayFabError<%- errorProps.name %> = <%- errorProps.id %>,
        <% } %>PlayFabError<% var errorProps = errors[errorList[errorList.length-1]] %><%- errorProps.name %> = <%- errorProps.id %>
    };

    struct PlayFabError
    {
        int HttpCode; // Http status code
        AZStd::string HttpStatus; // Http status code description
        PlayFabErrorCode ErrorCode; // Playfab error
        AZStd::string ErrorName; // PlayFab error name
        AZStd::string ErrorMessage; // PlayFab error message
        std::map< AZStd::string, AZStd::string > ErrorDetails; // More specific details about failures (when present)
    };

    typedef void(*ErrorCallback)(const PlayFabError& error, void* customData);
}
